package me.hetong.caigou.ui.view;

import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Pane;
import javafx.scene.layout.VBox;

import java.util.ArrayList;
import java.util.List;

import static me.hetong.caigou.Global.config;

/**
 * 主区域
 *
 * @author hetong
 */
public class Right {

    public static List<Pane> list = new ArrayList<>();

    public static Pane init() {

        VBox vBox = new VBox();
        vBox.getChildren().add(createPane(Infer.init(list)));
        vBox.getChildren().add(createPane(Help.init(list)));

        return vBox;
    }

    private static Pane createPane(Pane pane) {

        pane.setPrefSize(config.getRightWidth(), config.getHeight());
        pane.setMinSize(config.getRightWidth(), config.getHeight());
        pane.setMaxSize(config.getRightWidth(), config.getHeight());

        pane.setStyle("-fx-background-color:linear-gradient(to top, #1a4484, #0067a4, #0088ae, #00a7a4, #0dc28b);");

        return pane;
    }
}
